package com.jiang.专题.字符串.Q58;

/**
 * @author Jiang
 * @version 1.0
 * @date 2024/12/17 23:31
 */
class Solution {
    public int lengthOfLastWord(String s) {
        String s1 = s.trim();
        String[] temp = s1.split(" ");
        return temp[temp.length - 1].length();
    }
}
